import org.junit.jupiter.api.Test;

import java.util.*;
import java.util.stream.IntStream;
import java.util.stream.Stream;

/**
 * @author yellow Docter
 * @date 2022 -10-28
 * @desc
 */
public class Demo01 {

    @Test
    public void demo01(){


        //流的创建

        // 集合流的创建

        Collection collection; //中有 stream() 方法 他的子类都有这个方法


        List<String> strs =new ArrayList<>();

        Stream<String> stream = strs.stream();
        System.out.println("stream = " + stream);


        HashSet<String> strings = new HashSet<>();
        Stream<String> stream1 = strings.stream();

        // 数组流的创建
        int [] arr = {1,2,3};
        IntStream stream2 = Arrays.stream(arr);

    }
}
